Add Docker update functionality with configuration preservation to install-docker-ce.ps1#599
Add Docker update functionality with configuration preservation to install-docker-ce.ps1#599
Conversation
Co-authored-by: ntrappe-msft <124631722+ntrappe-msft@users.noreply.github.com>
Co-authored-by: ntrappe-msft <124631722+ntrappe-msft@users.noreply.github.com>
|
This issue has been open for 30 days with no updates. |
4 similar comments
|
This issue has been open for 30 days with no updates. |
|
This issue has been open for 30 days with no updates. |
|
This issue has been open for 30 days with no updates. |
|
This issue has been open for 30 days with no updates. |
|
This issue has been open for 30 days with no updates. |
1 similar comment
|
This issue has been open for 30 days with no updates. |
This PR enhances the
install-docker-ce.ps1script to support updating existing Docker installations while preserving thedaemon.jsonconfiguration file, eliminating the need for manual backup/restore steps.Problem
Previously, updating Docker required a complex 7-step manual process:
C:\ProgramData\docker\config\daemon.jsonThe script would either skip installation entirely if Docker was already installed, or perform a clean install that overwrote existing configuration.
Solution
Added a new
-Updateswitch parameter that automates the entire update process:Key Features
Automated Update Process:
daemon.jsonconfigurationRobust Error Handling:
Backwards Compatibility:
Technical Implementation
Backup-DockerConfig()andRestore-DockerConfig()with validationInstall-ContainerHost()andInstall-Docker()to handle update scenariosTesting
The implementation includes comprehensive error handling for edge cases:
Fixes #595.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.